﻿using System;
using Telerik.Web.UI;

public partial class ltMan_news_clsList : AdminBasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        BindData();
    }
    void BindData()
    {
        RadTreeList1.DataSource = new ltModel.BLL.article_class().GetAllList();
        RadTreeList1.DataBind();
        RadTreeList1.ExpandAllItems();
    }
    protected void RadTreeList1_ItemCommand(object sender, TreeListCommandEventArgs e)
    {
        if (e.CommandName == "Delete")
        {
            ltModel.BLL.article_class ac = new ltModel.BLL.article_class();
            int id = int.Parse(e.CommandArgument.ToString());
            OperateLog.AddSuccessLog(CurrentUser.user_id, Request.UserHostAddress, "类别管理-删除>" + ac.GetModel(id).classname);
            ac.Delete(id);
            BindData();
        }
    }
}